package com.kavitha.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.kavitha.model.Calculator;

@Component
@Controller
public class MainController {

	@RequestMapping("calc.do")
	public ModelAndView calculate(Calculator calculator){
		return new ModelAndView("index", "result", calculator.result());
	}
	
}
